package org.hoyi.util;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class ExpiresTime
{

	public static String GetTime_30min()
	{
		SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		Calendar can = Calendar.getInstance();
		can.add(Calendar.MINUTE, +(3 * 24 * 60));
		String date = format.format(can.getTime());
		return date;
	}

	public static String GetTimeYears()
	{
		SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		Calendar can = Calendar.getInstance();
		can.add(Calendar.YEAR, +10);
		String date = format.format(can.getTime());
		return date;
	}

	public static String GetTime_2min()
	{
		SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		Calendar can = Calendar.getInstance();
		can.add(Calendar.MINUTE, +2);
		String date = format.format(can.getTime());
		return date;
	}

	public static Date GetTime_6h(Date date)
	{
		Calendar can = Calendar.getInstance();
		can.setTime(date);
		can.add(Calendar.MINUTE, +(6 * 60));
		return can.getTime();
	}
}
